package Cantella::DJabberd::Model::Admin::Role::Action::Update;

use Reaction::Class;

#use Reaction::Types::Core qw( NonEmptySimpleStr );

use aliased 'Reaction::InterfaceModel::Action::DBIC::Result::Update' => 'DBIC_Update';

class Update is DBIC_Update, which {

#  has name        => ( is => 'rw', isa => NonEmptySimpleStr, lazy_fail => 1 );
#  has description => ( is => 'rw', isa => 'Str' );
  has users => (
                is  => 'rw',
                isa => 'ArrayRef',
                valid_values => sub {
                  shift->target_model->result_source
                    ->related_source('user_roles')
                      ->related_source('user')->resultset;
                }
               );
  };

1;
